<div class="navbar navbar-inverse" style="height:50px">
    <div class="navbar-inner">
        <div class="container-fluid">
            <a class="brand" href=""><small><i class="icon-leaf"></i></small>开会吧任务管理系统 </a>

            <ul class="nav ace-nav pull-right">
                <li class="grey">
                    <a href="javascript:alert('预留功能,待开发');" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="icon-tasks"></i>
                        <span class="badge">4</span>
                    </a>
                    <ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
                        <li class="nav-header">
                            <i class="icon-ok"></i> 4 任务完成
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left">软件更新</span>
                                    <span class="pull-right">65%</span>
                                </div>
                                <div class="progress progress-mini"><div class="bar" style="width:65%"></div></div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left">软件更新</span>
                                    <span class="pull-right">35%</span>
                                </div>
                                <div class="progress progress-mini progress-danger"><div class="bar" style="width:35%"></div></div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left">运行测试</span>
                                    <span class="pull-right">15%</span>
                                </div>
                                <div class="progress progress-mini progress-warning"><div class="bar" style="width:15%"></div></div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left">Bug 修复</span>
                                    <span class="pull-right">90%</span>
                                </div>
                                <div class="progress progress-mini progress-success progress-striped active"><div class="bar" style="width:90%"></div></div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                查看任务明细
                                <i class="icon-arrow-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="purple">
                    <a href="javascript:alert('预留功能,待开发');" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="icon-bell-alt icon-animated-bell icon-only"></i>
                        <span class="badge badge-important">8</span>
                    </a>
                    <ul class="pull-right dropdown-navbar navbar-pink dropdown-menu dropdown-caret dropdown-closer">
                        <li class="nav-header">
                            <i class="icon-warning-sign"></i> 8 通知计划
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left"><i class="icon-comment btn btn-mini btn-pink"></i> 新消息</span>
                                    <span class="pull-right badge badge-info">+12</span>
                                </div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <i class="icon-user btn btn-mini btn-primary"></i> 测试消息
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left"><i class="icon-shopping-cart btn btn-mini btn-success"></i> 新订单</span>
                                    <span class="pull-right badge badge-success">+8</span>
                                </div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                <div class="clearfix">
                                    <span class="pull-left"><i class="icon-twitter btn btn-mini btn-info"></i> 等待消息</span>
                                    <span class="pull-right badge badge-info">+4</span>
                                </div>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                查看所有消息
                                <i class="icon-arrow-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="green">
                    <a href="javascript:alert('预留功能,待开发');" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="icon-envelope-alt icon-animated-vertical icon-only"></i>
                        <span class="badge badge-success">5</span>
                    </a>
                    <ul class="pull-right dropdown-navbar dropdown-menu dropdown-caret dropdown-closer">
                        <li class="nav-header">
                            <i class="icon-envelope"></i> 5 条信件
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
									<span class="msg-body">
										<span class="msg-title">
											<span class="blue">张三:</span>
											你好，我们在哪里吃饭? ...
										</span>
										<span class="msg-time">
											<i class="icon-time"></i> <span>1个月以前</span>
										</span>
									</span>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
									<span class="msg-body">
										<span class="msg-title">
											<span class="blue">李四:</span>
											你在哪上班? ...
										</span>
										<span class="msg-time">
											<i class="icon-time"></i> <span>20分钟前</span>
										</span>
									</span>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
									<span class="msg-body">
										<span class="msg-title">
											<span class="blue">王五:</span>
											你好，我对你很感兴趣 ...
										</span>
										<span class="msg-time">
											<i class="icon-time"></i> <span>下午 3:15 </span>
										</span>
									</span>
                            </a>
                        </li>

                        <li>
                            <a href="javascript:alert('预留功能,待开发');">
                                查看所有信件
                                <i class="icon-arrow-right"></i>
                            </a>
                        </li>

                    </ul>
                </li>
                <li class="light-blue"><a data-toggle="dropdown" href="#"
                                          class="dropdown-toggle"> <i
                        class="icon-user icon-animated-vertical"></i> <span
                        class="user-info"> <small>欢迎您,</small> ${cnname!''}
						</span> <i class="icon-caret-down"></i>
                </a>

                    <ul
                            class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer">
                        <li><a href="#" onclick="addTab('修改我的密码','/newPassword')">
                            <i class="icon-cog"></i> 修改密码
                        </a></li>

                        <li class="divider"></li>

                        <li><a href="${ctx}/logout"> <i class="icon-off"></i> 退出
                        </a></li>
                    </ul></li>
            </ul><!--/.ace-nav-->
        </div><!--/.container-fluid-->
    </div><!--/.navbar-inner-->
</div><!--/.navbar-->


<script type="text/javascript">

    //菜单状态切换
    var fmid = "fhindex";
    var mid = "fhindex";
    function siMenu(id,fid){
        if(id != mid){
            $("#"+mid).removeClass();
            mid = id;
        }
        if(fid != fmid){
            $("#"+fmid).removeClass();
            fmid = fid;
        }
        $("#"+fid).attr("class","active open");
        $("#"+id).attr("class","active");
        jzts();
    }

    $(function(){

        //换肤
        $("#skin-colorpicker").ace_colorpicker().on("change",function(){
            var b=$(this).find("option:selected").data("class");
            hf(b);
            var url = '<%=basePathh%>/head/setSKIN.do?SKIN='+b+'&tm='+new Date().getTime();
            $.get(url,function(data){});

        })
    })

    var USER_ID;

    function getUname(){
        $.ajax({
            type: "POST",
            url: '<%=basePathh%>/head/getUname.do?tm='+new Date().getTime(),
            data: encodeURI(""),
            dataType:'json',
            //beforeSend: validateData,
            cache: false,
            success: function(data){
                //alert(data.list.length);
                $.each(data.list, function(i, list){

                    //登陆者资料
                    $("#user_info").html('<small>Welcome</small> '+list.NAME+'');


                    USER_ID = list.USER_ID;//用户ID
                    hf(list.SKIN)//皮肤

                    if(list.USERNAME != 'admin'){
                        $("#adminmenu").hide();	//隐藏菜单设置
                        $("#adminzidian").hide();	//隐藏数据字典
                        $("#systemset").hide();	//隐藏系统设置
                        $("#productCode").hide();	//隐藏代码生成
                    }

                });
            }
        });
    }
    getUname();

    function hf(b){

        var a=$(document.body);
        a.attr("class",a.hasClass("navbar-fixed")?"navbar-fixed":"");
        if(b!="default"){
            a.addClass(b)
        }if(b=="skin-1"){
            $(".ace-nav > li.grey").addClass("dark")
        }else{
            $(".ace-nav > li.grey").removeClass("dark")
        }
        if(b=="skin-2"){
            $(".ace-nav > li").addClass("no-border margin-1");
            $(".ace-nav > li:not(:last-child)").addClass("white-pink")
                    .find('> a > [class*="icon-"]').addClass("pink").end()
                    .eq(0).find(".badge").addClass("badge-warning")
        }else{
            $(".ace-nav > li").removeClass("no-border").removeClass("margin-1");
            $(".ace-nav > li:not(:last-child)").removeClass("white-pink")
                    .find('> a > [class*="icon-"]').removeClass("pink").end()
                    .eq(0).find(".badge").removeClass("badge-warning")
        }
        if(b=="skin-3"){
            $(".ace-nav > li.grey").addClass("red").find(".badge").addClass("badge-yellow")
        }else{
            $(".ace-nav > li.grey").removeClass("red").find(".badge").removeClass("badge-yellow")
        }
    }

</script>
